package com.example.restaurant.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.restaurant.model.Dish;
import com.example.restaurant.model.DishType;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.restaurant.service.param.AddDishTypeParam;
import com.example.restaurant.service.param.UpdateDishTypeParam;

import java.util.List;

/**
 * <p>
 * 菜类表 服务类
 * </p>
 *
 * @author x
 * @since 2022-09-29
 */
public interface DishTypeService extends IService<DishType> {


    //查询菜类 调用DishTypeMapper查询
    Page<DishType> getDishType(int userId,int current,int size);

    //修改菜类
    boolean modifyDishType(UpdateDishTypeParam updateDishTypeParam);
    //新增菜类
    boolean addDishType(AddDishTypeParam addDishTypeParam);

    //删除菜类 调用DishTypeMapper
    boolean delDishType(int dishTypeId);

    //通过菜类ID获取菜类信息
    List<DishType> getDishTypeById(int storeId);

    //通过门店ID查询菜类ID
    List<Integer> getDishTypeIdByStoreId(int storeId);

    //根据门店id和模糊类型名字，模糊查询
    Page<DishType> selDishTypeByName(int storeId, String dishTypeName, int current, int size);

}
